/*
============================================================================
 Name        : StreamPlayer.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CStreamPlayer declaration
============================================================================
*/

#ifndef __STREAMPLAYER_H__
#define __STREAMPLAYER_H__

// INCLUDES
#include <e32std.h>
#include <e32base.h>

#include "StreamBuffer.h"

class CStreamReader;
class CStreamWriter;

// CLASS DECLARATION
class CStreamPlayer : public CBase
{
public: // Constructors and destructor
	IMPORT_C ~CStreamPlayer();

protected: //Construction
	IMPORT_C CStreamPlayer();
	IMPORT_C virtual void ConstructL();


public: //new functions
	//Operations
	IMPORT_C void StartL(const TDesC& aUrlRequest);
	IMPORT_C void StopL();

	IMPORT_C TInt Volume();
	IMPORT_C void SetVolume(TInt aVolume);

protected: //new functions
	//Reader and writer setters
	IMPORT_C void SetReaderL(CStreamReader* aStreamReader);
	IMPORT_C void SetWriterL(CStreamWriter* aStreamWriter);


private: //new functions
	void Clean();


protected: //data
	//Data buffer 
	CStreamBuffer* iStreamBuffer;
	
	//Reader (socket) and writer (player)
	CStreamReader* iStreamReader;
	CStreamWriter* iStreamWriter;

};

#endif // __STREAMPLAYER_H__
